package cn.bearspark.framework.mq.starter.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * RocketMQ 生产者的属性类
 *
 * @author f
 */
@ConfigurationProperties(prefix = "bs.rmq.producer")
public class RocketMQProducerProperties {

    /**
     * nameSrv 的地址
     */
    private String nameSrv;

    /**
     * 生产者组的组名
     */
    private String groupName;

    /**
     * 发送消息的超时时间
     */
    private Integer sendMsgTimeout;

    /**
     * 消息发送失败的重试次数
     */
    private Integer retryTimes;

    public String getNameSrv() {
        return nameSrv;
    }

    public void setNameSrv(String nameSrv) {
        this.nameSrv = nameSrv;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public Integer getSendMsgTimeout() {
        return sendMsgTimeout;
    }

    public void setSendMsgTimeout(Integer sendMsgTimeout) {
        this.sendMsgTimeout = sendMsgTimeout;
    }

    public Integer getRetryTimes() {
        return retryTimes;
    }

    public void setRetryTimes(Integer retryTimes) {
        this.retryTimes = retryTimes;
    }

    @Override
    public String toString() {
        return "RocketMQProducerProperties{" +
               "nameSrv='" + nameSrv + '\'' +
               ", groupName='" + groupName + '\'' +
               ", sendMsgTimeout=" + sendMsgTimeout +
               ", retryTimes=" + retryTimes +
               '}';
    }
}
